package rocksea.com.wechat;

/**
 * Created by Mrw on 2018/1/31.
 *
 *  */
public class JavaSingleton
{
    private static JavaSingleton instance = null;
    private JavaSingleton()
    {}
    public static JavaSingleton getInstance()
    {
        synchronized (JavaSingleton.class)
        {
            if (instance==null)
                instance = new JavaSingleton();
            return instance;
        }
    }
    public void writeFile()
    {
        System.out.println("Java 写文件");
    }

    public void doNetWork()
    {
        System.out.println("Java 网络请求");
    }
}
